<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>{$meta_title}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="__ADMIN__/css/admin.css"></head>
  <link rel="stylesheet" href="__ADMIN__/css/font.css"></head>
<body>
  <div class="layui-card layui-card-open">
    <div class="layui-card-body">
      <form class="layui-form" lay-filter="collect" action="{:url('renew')}">
        <div class="layui-tab">
          <ul class="layui-tab-title">
            <li class="layui-this">手动更新</li>
          </ul>
          <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
              <div class="layui-form-item">
                <label class="layui-form-label">每页数量</label>
                <div class="layui-input-inline">
                  <select name="limit">
                    <option value="5" >每页5条</option>
                    <option value="10">每页10条</option>
                    <option value="20">每页20条</option>
                    <option value="50" selected="selected">每页50条</option>
                    <option value="100">每页100条</option>
                    <option value="200">每页200条</option>
                    <option value="500">每页500条</option>
                  </select>
                </div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">开始页</label>
                <div class="layui-input-block">
                  <input type="number" name="start_page" lay-verify="required" class="layui-input" value="1">
                </div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">结束页(选填)</label>
                <div class="layui-input-block">
                  <input type="number" name="end_page" class="layui-input" value="">
                </div>
              </div>
            </div>

            <input type="hidden" name="type" value="true">

          </div>
        </div>
        <div class="layui-layout-admin">
          <div class="layui-input-block">
            <div class="layui-footer">
              <button type="submit" style="width: 150px!important;" lay-submit lay-filter="manual_renew" class="layui-btn">提交</button>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script type="text/javascript" src="__STATIC__/jquery/jquery.min.js"></script>
  <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js"></script>
  <script type="text/javascript" src="__ADMIN__/js/admin.js"></script>
  <script type="text/javascript">
    layui.use('form', function(){
      var form = layui.form;
      form.on('submit(manual_renew)', function(data){
        layer.confirm('确认要执行手动更新吗？',function(index){
          $.get($(data.form).attr('action'),data.field, function(data){
            if(data.code){
              layer.msg(data.msg, {icon: 1,shade: 0.3,time: 2000},function(layero, index){
                location.reload();
              });
            } else {
              layer.msg(data.msg, {icon: 0});
            }
          }, "json");
        });
        return false;
      });
    });
  </script>
</body>
</html>